package com.chazz.utils;

import java.util.HashMap;
import java.util.Map;

public final class Tools {

    public static final Integer BLOG_ID = 1;        //博客编号
    public static final Integer PAGE_SIZE = 6;      //每页记录数
    public static final Integer NAVIGATE_PAGES = 6; //分页导航显示的数目

    private static Map<String,String> map = new HashMap<>();
    static {
        map.put("<","&lt;");
        map.put(">","&gt;");
    }
    public static String escape(String content){
        for (String key : map.keySet()){
            if(content!=null&&content.contains(key)){
                content = content.replaceAll(key,map.get(key));
            }
        }
        return content;
    }
}
